/* Change Flow Starts */

function NextFlowStatus(form_id,status)

{	

	j("#nextflowstatus").val(status);	

	
	form_id='#'+form_id;
	
	$(form_id).submit();

}

function NextFlowStatus_old(form_id,status)

{	

	$("nextflowstatus").value=status;	

	$(form_id).submit();

}





/* Change Flow Ends */



/* Tour Detapture Price Calculation Starts */

function doCalculateTourDetapture()

	{	

		var totald2;

		

		totald2 = NumericCheck((NumericCheck($("tour_departure_cost").value)+NumericCheck($("tour_departure_taxes").value)));		

		totald2=parseFloat(totald2);

				

		var w= new String(totald2);

		

		var d=w.length;

		var t= w.indexOf('.');

		//alert(t)

		var minus = d-t;

		

		if(minus>10)

		{	

			$("tour_departure_total_cost").value = totald2.toFixed(2);			

		}

		else

		{		

			$("tour_departure_total_cost").value =totald2;

		}

				

	}

	function changeTourDetaptureFee()

	{	

		if($("tour_departure_cost").value=="")

		{

			$("tour_departure_cost").value=0;

			

		}

		else

		{

			var due=parseFloat($("tour_departure_cost").value);

			$("tour_departure_cost").value =due;

		}

		

		if($("tour_departure_taxes").value=="")

		{			

			$("tour_departure_taxes").value=0;

		}

		else

		{

			var due=parseFloat($("tour_departure_taxes").value);

			$("tour_departure_taxes").value=due;

		}		

		if($("tour_departure_total_cost").value=="")

		{

			$("tour_departure_total_cost").value=0;	

			

		}

		else

		{

			var due=parseFloat($("tour_departure_total_cost").value);

			$("tour_departure_total_cost").value=due;

		}

				

	}

/* Tour Detapture Price Calculation Ends */



/* Tour Template Details Starts */

function getTemplateDetails(sel)

{	

	var TemplateID = sel.options[sel.selectedIndex].value;

	window.location.href="nl_send_email.php?nl_tab_id=4&selected_template_id="+TemplateID;

	

}

/* Tour Template Details Ends */



/* Gallery Ecard Cancel Starts */

function BookingQueryCancel()

{

	$('query_content').style.display = 'none';

	$('query_errmsg').innerHTML = '';

	$('BookingQuery').value = '';	

}

/* Gallery Ecard Cancel Ends */

function nondeletemsg()

 {

	alert("This customer group can not be deleted...");

	return false;

 }



function focus_blur(id,text){
if(j('#'+id).val()=='')
j('#'+id).val(text);	

j('#'+id).focus(function(){
if(j('#'+id).val()==text)
j('#'+id).val('');	
});

j('#'+id).blur(function(){
if(j('#'+id).val()=='')
j('#'+id).val(text);	
});

}
